import { desktopCapturer, BrowserWindow } from "electron";
import { Rectangle } from "electron/main";
/*
 * 桌面截图
 */

const getDeskCapture = (mainWindow: BrowserWindow): Promise<string> => {
  return new Promise(async (resolve) => {
    const res = await mainWindow.webContents.capturePage();
    resolve(res.toDataURL());
  });
};

export default getDeskCapture;
